package com.wiscamp.ninechapters.problems.application.assemblers;

import com.wiscamp.ninechapters.problems.application.dto.commands.types.CreateQuestionTypeCommand;
import com.wiscamp.ninechapters.problems.application.dto.commands.types.UpdateQuestionTypeCommand;
import com.wiscamp.ninechapters.problems.application.dto.vo.types.QuestionTypeVO;
import com.wiscamp.ninechapters.problems.domain.models.types.QuestionType;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface QuestionTypeAssembler {
    QuestionTypeAssembler Instance = Mappers.getMapper(QuestionTypeAssembler.class);

    QuestionTypeVO toQuestionTypeVO(QuestionType entity);

    QuestionType fromCreateCommand(CreateQuestionTypeCommand command);

    QuestionType fromUpdateCommand(UpdateQuestionTypeCommand command);
}
